package cn.xiaoliu.order.service;

import cn.xiaoliu.basic.service.IBaseService;
import cn.xiaoliu.basic.utils.PageList;
import cn.xiaoliu.order.domain.AdoptOrder;
import cn.xiaoliu.order.domain.OrderAddress;
import cn.xiaoliu.order.query.AdoptOrderQuery;
import cn.xiaoliu.user.domain.Logininfo;

import java.util.Map;

public interface IAdoptOrderService extends IBaseService<AdoptOrder> {
    /**
     * 领养宠物订单
     * @param params
     * @param logininfo
     * @return
     */
    String submit(Map<String, Object> params, Logininfo logininfo);

    /**
     * 查询用户自己的订单
     * @param query
     * @param logininfo
     * @return
     */
    PageList<AdoptOrder> queryUserOrder(AdoptOrderQuery query, Logininfo logininfo);

    /**
     * 查询平台管理员的订单或店铺订单
     * @param query
     * @param logininfo
     * @return
     */
    PageList<AdoptOrder> queryAdmin(AdoptOrderQuery query, Logininfo logininfo);

    /**
     * 获取地址
     * @param unionPaySn
     * @return
     */
    OrderAddress getOrderAdress(String unionPaySn);

    /**
     * 取消订单
     * @param orderId
     */
    void cancelByQuartz(Long orderId);
}
